<template>
  <div>
    <ul>
      <li v-for="item in movieData" :key="item.id">
        <router-link to="/detailPage">
          <img :src="item.images.small" alt="" />
          <!-- 为什么上边照片渲染不出来 -->
          <div class="right">
            <div class="title">{{ item.title }}</div>
          </div>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
import movieData from '../../../assets/data/now_hot_movie.json'
export default {
  data () {
    return {
      movieData: movieData.subjects
    }
  }
}
console.log(movieData.subjects)
</script>

<style scoped>
ul {
  height: 1200px;
  overflow: auto;
}
li {
  width: 100%;
  height: 240px;
  margin-top: 10px;
}
img {
  width: 150px;
  height: 230px;
  float: left;
  margin-left: 20px;
}
.right {
  float: left;
  width: 500px;
  overflow: hidden;
}
.title {
  line-height: 240px;
  text-align: left;
  font-size: 40px;
  text-indent: 10px;
}
</style>
